< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03110100.xhp

(section: operatoren) (bookmark: bm_id3150682)
comparison operators;Office Basic
operators;comparisons

比較演算子;Office Basic
演算子;比較

Comparison Operators [Runtime]
比較演算子 [実行時](hd_id3150682.1)

Comparison operators compare two expressions. The result is returned as a Boolean expression that determines if the comparison is True (-1) or False (0).
比較演算子は、2 つの表式の比較を行う際に使用します。比較の結果は、True (-1) ないし False (0) で表されるブール型表式として返されます。(par_id3156042.2)

(/section: operatoren)

Syntax:
構文:(hd_id3147291.3)

Result = Expression1 { = | < | > | <= | >= } Expression2
Result = Expression1 { = | < | > | <= | >= } Expression2(par_id3149177.4)

Parameters:
パラメータ:(hd_id3145316.5)

Result: Boolean expression that specifies the result of the comparison (True, or False)
Result: 比較結果 (True ないし False) を格納するブール型表式。(par_id3147573.6)

Expression1, Expression2: Any numeric values or strings that you want to compare.
Expression1、Expression2: 比較する数値ないし文字列。(par_id3148686.7)

Comparison operators
比較演算子(hd_id3147531.8)

= : Equal to
= : 等しい(par_id3147265.9)

< : Less than
< : より小さい(par_id3154924.10)

> : Greater than
> : より大きい(par_id3146795.11)

<= : Less than or equal to
<= : 以下(par_id3150541.12)

>= : Greater than or equal to
>= : 以上(par_id3150400.13)

<> : Not equal to
<> : 等しくない(par_id3148797.14)

Example:
例:(hd_id3154686.15)

Sub ExampleUnequal
Sub ExampleUnequal(par_id3153969.16)

DIM sFile As String
DIM sFile As String(par_id3159151.17)

DIM sRoot As String REM ' Root directory for file in and output
DIM sRoot As String REM 入出力ファイルのルートディレクトリ(par_id3154909.18)

sRoot = "c:\"
sRoot = "c:\"(par_id3150767.19)

sFile = Dir$( sRoot ,22)
sFile = Dir$( sRoot ,22)(par_id3154125.20)

If sFile <> "" Then
If sFile <> "" Then(par_id3150440.21)

Do
Do(par_id3147288.22)

Msgbox sFile
Msgbox sFile(par_id3150010.23)

sFile = Dir$
SFile = Dir$(par_id3153727.24)

Loop Until sFile = ""
Loop Until sFile = ""(par_id3149664.25)

End If
End If(par_id3146986.26)

End sub
End sub(par_id3153952.27)


< Prev / Next >